﻿#if UNITY_EDITOR
using System.Collections.Generic;
/// <summary>
/// AssetBundle资源包逻辑代码
/// </summary>
public partial class ESF_Logic
{
    /// <summary>
    /// AssetBundle资源包生成
    /// </summary>
    public static ESF_BuildXmlAsset_CacheXmlCatalog<ESF_Xml_BuildAssetBundle> assetBundleBuild { get { return GetCacheXmlCatalog<ESF_Xml_BuildAssetBundle>(ESF_enCacheXmlCatalog.AssetBundle); } }

    /// <summary>
    /// AssetBundle资源包架构
    /// </summary>
    public static ESF_BuildXmlAsset_CacheXmlCatalog<ESF_Xml_AssetBundleSchema> assetBundleSchema { get { return GetCacheXmlCatalog<ESF_Xml_AssetBundleSchema>(ESF_enCacheXmlCatalog.AssetBundle); } }

    #region CollectAssetBundle 收集AssetBundle资源包
    /// <summary>
    /// 收集AssetBundle资源包
    /// </summary>
    /// <typeparam name="T">泛型</typeparam>
    /// <returns>Xlsx表架构</returns>
    public static List<T> CollectAssetBundle<T>()
        where T : ESF_CollectAsset_AssetBundle
    {
        return ESF_Utility.CollectFile<T>(assetBundleBuild.xml.assetBundleRoots, enESF_AssetFilterClassify.Object, enESF_DependencyClassify.UnClude,
            (n)=> {
                return n.IsAllowSetAssetBundle();
            },
            enESF_DisplayProgressBarClassify.Normal);
    }
    #endregion
}
#endif
